#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main()
{
	int m = 0;
	int n = 0;
	double ave = 0;
	scanf("%d %d", &m, &n);
	double* score = malloc(m * n);
	int i = 0;
	int j = 0;
	for (i = 0; i < m; i++)
	{
		for (j = 0; j < n; j++)
		{
			scanf("%lf", &score[i*n+j]);
			ave += score[i*n+j];
		}
	}
	ave /= m * n;
	printf("%.2f",ave);
	return 0;
}